package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Demo1Application {

	public static void main(String[] args) {
		ConfigurableApplicationContext applicationContext=SpringApplication.run(Demo1Application.class, args);
		User user=applicationContext.getBean(User.class);
		Student student=applicationContext.getBean(Student.class);
		System.out.println(user.getStudent());
		System.out.println(student);
		System.out.println(user.getStudent()==student);
//		applicationContext.close();
	}

}
